<table cellpadding="3" cellspacing="1">
    <tr>
        <th > 部门号 </th>
        <th> 部门简称 </th>
        <th> 部门全称 </th>
        <th>部门地址 </th>
        <th>区县 </th>
        <th>电话 </th>
        <th>负责人 </th>
        <th>负责人电话 </th>
        <th>创建时间 </th> 
        <th>操作</th>
<tr>
<#if (departmentList?size>0)>
    <#list departmentList as department >
        <tr>
            <td valign="top" nowrap="nowrap" align="center"> ${department.deptNo}
            </td>
            <td align="center">${department.deptName!}<br/></td>
            <td align="center" valign="top" nowrap="nowrap">${department.deptLongName!}</td>
            <td align="center" valign="top">  ${department.deptLocation} </td>
            <td align="center" valign="top" nowrap="nowrap">
            
              <#if (organizationList?size>0) >
						<#list  organizationList as org>
							 
						<#if department.deptAreano==org.orgId >
					
							  ${org.name}
						 
						</#if>
							  
						</#list>
						</#if>
          </td>
         	<td align="center" valign="top" nowrap="nowrap">${department.deptTel!}</td>
          	<td align="center" valign="top" nowrap="nowrap">${department.deptMajor!}</td>
           	<td align="center" valign="top" nowrap="nowrap">${department.deptMajorPhone!}</td>
            <td align="center" valign="top" nowrap="nowrap">${department.createDate}</td>
            <td align="center" valign="top" nowrap="nowrap">
                <a href="../employee/getDepartmentById.action?deptNo=${department.deptNo}">编辑</a>
                <a onclick="{if(confirm('你确定要删除吗？')){return true;}return false;}"
                   href="../employee/deleteDepartmentById.action?deptNo=${department.deptNo}">删除</a>
            </td>
        </tr>
    </#list>
</#if>
</table>
<script type="text/javascript">
     listTable.action = "ajaxQueryDepartmentList.action";
     listTable.currentPage=${(page.currentPage)?c};
     listTable.pageCount=${(page.totalPage)?c};
     listTable.recordCount=${(page.allRow)?c};
 </script>
<!-- 分页 -->
<table id="page-table" cellspacing="0">
			<tr>
				<td align="right" nowrap="true">
					<div id="turn-page">
					共<span id="totalRecords">${page.allRow} </span>条记录&nbsp; 
					共<span	id="totalPages">${page.totalPage}</span> 页&nbsp;
				当前第<span	id="pageCurrent">${page.currentPage}</span>页&nbsp;  
	     
	     <!--也许可以换种方式，呵呵，不用人工输入，用下拉列表-->
	     每页显示记录条数 <input type='text' size='3' id='pageSize' value="${page.pageSize}" onkeypress="return listTable.changePageSize(event)" />
	   <!--查询动作-->
	    <input type='hidden' size='3' id='action' value="ajaxQueryDepartmentList.action"/>
	       
							
						<span id="page-link">  
						<a	href="javascript:listTable.gotoPageFirst()">第一页</a> 
						<a	href="javascript:listTable.gotoPagePrev()">前一页</a> 
						<a	href="javascript:listTable.gotoPageNext()">下一页</a> 
						<a	href="javascript:listTable.gotoPageLast()">最后一页</a> 
						<select	id="gotoPage" onchange="listTable.gotoPage(this.value)">
						<#assign x=page.totalPage>
						<#assign y=page.currentPage>
						<#list 1 .. x as i>
						<#if y==i >
						    <option value="${(i)?c}" selected="selected">${(i)?c}</option>
						<#else>
							<option value="${(i)?c}" >${(i)?c}</option>
						</#if>
						</#list>
           </select>
        </span>
        </div>
        </td>
        
    </tr>
</table>
